package com.shop.mapper;

import com.shop.model.Category;
import com.shop.model.Goods;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {
    List<Category> selectAllCategory();

    void CategoryAdd(String name, Integer pid);

    Category selectByName(String name);
    void update(Category category);

    void delete(Integer id);

    List<Goods> selectGoodsByCategoryId(Integer id);

    List<Integer> selectCategoryIdByPid(Integer id);
}
